package com.ssy.lingxi.platform.template.service.controller.inner;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.template.api.model.dto.inner.CategorySortDTO;
import com.ssy.lingxi.platform.template.service.service.web.CategoryWebService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @menu web-平台品类 - 内部接口
 * @author lqa
 * @version 2.0.0
 * @date 2022/1/6
 */
@Api(tags = "web平台品类 - 内部接口")
@RestController
@RequestMapping("/template/inner/web/categoryWeb/updateCategory")
public class CategoryWebInnerController {

    @Resource
    private CategoryWebService categoryWebService;
    /**
     * 更新品类排序序号
     * @param dto 请求实体
     * @return 操作结果
     */
    @PostMapping("/updateCategorySort")
    public Wrapper<Void> updateCategorySort(@RequestBody @Valid CategorySortDTO dto){
        return Wrapper.success(categoryWebService.updateCategorySort(dto));
    }
}
